Sufficient conditions for the similarity of the operator $A := 1/r(x) (-d^2/dx^2 +q(x))$ with an indefinite weight $r(x)=(\sgn x)|r(x)|$ are obtained. These conditions are formulated in terms of Titchmarsh-Weyl $m$-coefficients. Sufficient conditions for the regularity of the critical points 0 and $\infty$ of $J$-nonnegative Sturm-Liouville operators are also obtained. This result is exploited to prove the regularity of 0 for various classes of Sturm-Liouville operators. This implies the similarity of the considered operators to self-adjoint ones. In particular, in the case $r(x)=\sgn x$ and $q\in L^1(R, (1+|x|)dx)$, we prove that $A$ is similar to a self-adjoint operator if and only if $A$ is $J$-nonnegative. The latter condition on $q$ is sharp, i.e., we construct $q\in \cap_{\gamma <1} L^1(R, (1+|x|)^\gamma dx)$ such that $A$ is $J$-nonnegative with the singular critical point 0. Hence $A$ is not similar to a self-adjoint operator. For periodic and infinite-zone potentials, we show that $J$-positivity is sufficient for the similarity of $A$ to a self-adjoint operator. In the case $q\equiv 0$, we prove the regularity of the critical point 0 for a wide class of weights $r$. This yields new results for "forward-backward" diffusion equations.